package C622;

/**
 * @program: javase
 * @description:
 * @author: luolidong
 * @create: 2021-06-22 20:14
 * @version: 1.0
 */
public class LambdaTest {
    public static void main(String[] args) {
        //一般写法
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("run");
            }
        }).start();
        //使用Lambda简写
        new Thread(()->{
            System.out.println("Lambda1");
        }).start();
        //一条语句{}可以省略
        new Thread(()->System.out.println("Lambda2")).start();
    }
}
